package com.singleton.pattern.singleton;

/**
 * @author cc
 * @classname Singleton
 * @description 饿汉式-非懒加载        类加载时就初始化，浪费内存
 * @date 2022/3/29 22:52
 */
public class HungrySingleton {

    private static HungrySingleton singleton = new HungrySingleton();

    //饿汉式
    public static HungrySingleton getSingleton() {
        return singleton;
    }

}
